<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-07-31 17:46:49
 * @LastEditTime : 2019-12-26 17:59:45
 * @LastEditors  : Please set LastEditors
 -->
<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../../css/vant.css">
    <link rel="stylesheet" type="text/css" href="../../css/base.css" />
    <script type="text/javascript" src="../../script/jquery.js"></script>
    <script type="text/javascript" src="../../script/layer/mobile/layer.js"></script>
    <script type="text/javascript" src="../../script/vue.min.js"></script>
    <script type="text/javascript" src="../../script/vant.min.js"></script>
    <script type="text/javascript" src="../../script/fastclick.js"></script>
    <script type="text/javascript" src="../../script/base.js"></script>
    <style type="text/css">
        .van-search {
            /* background: transparent !important; */
            padding: 6px 0;
            border-bottom: 1px solid #ebedf0;
        }

        /* .van-search__content {
             background: transparent
         } */

        .van-search__action {
            color: #cd1b21;
            font-size: 13px;
            font-weight: 700;
        }

        .result {
            position: absolute;
            left: 0;
            top: 47px;
            bottom: 0;
            width: 100%;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .desc {
            color: #969799;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div class="init-full">
            <div class="body-no-bottom">
                
            </div>
        </div>
    </div>
</body>

<script type="text/javascript">
    var vm;
    apiready = function () {
        //$('.init-full').show();
        var userInfo = FLD.getUserInfo();

        var BHDeID = api.pageParam.BHDeID;

        vm = new Vue({
            el: '#app',
            data: {
                showLoading: false
            },
            created: function () {
                this.openDialog();
            },
            methods: {
                openDialog() {
                    this.$dialog.confirm({
                        title: '提示',
                        message: '是否删除该行程?'
                    }).then(() => {
                        var obj = {
                            S_Type: 3,
                            S_NBranchID: 0,
                            S_SDate: '',
                            S_EDate: '',
                            S_BHID: 0,
                            S_ClientID: '',
                            S_BHDeID: BHDeID
                        }
                        FLD.ajax('APP_BHJHADDN', obj, function (res) {
                            if (res.ds[0].status == 200) {
                                api.sendEvent({
                                    name: 'refreshTripList'
                                });
                                layer.open({
                                    content: '行程删除成功',
                                    skin: 'msg',
                                    time: 2,
                                    end: function () {
                                        api.closeWin();
                                    }
                                });
                            } else {
                                layer.open({
                                    content: res.ds[0].msg,
                                    skin: 'msg',
                                    time: 2
                                });
                            }
                        })
                    }).catch(() => {
                        api.closeFrame();
                    });
                },
            }
        })
    };
</script>

</html>